package com.zephyr.vchcenter.pbcFile.util;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;

import org.apache.log4j.Logger;

/**
 * @author zhaoyunxiao
 * 上传文件的工具类�����ļ��ϴ�������
 */
public class UploadFileUtil {

private static final Logger log=Logger.getLogger(UploadFileUtil.class);
//将上传到服务器的文件内容保存
public static void storeFile(byte[] b,File file){
	  //File file=null;
	  //BufferedOutputStream bufferedOutputStream=null;
	  OutputStream fileOutputStream=null;
	  try {
		  
		  fileOutputStream=new FileOutputStream(file);
		  
		  fileOutputStream.write(b);
		  fileOutputStream.flush();
		  fileOutputStream.close();
		  //file=new File(fileName);
	  } catch (Exception e) {
		  log.error(e.getMessage(), e);
	}
  }
}
